#ifndef xpack_adapter_multi_push
#define xpack_adapter_multi_push
#pragma push_macro("xuser")
#undef  xuser
#define xuser mixc::adapter_multi_push::inc
#include"macro/xexport.hpp"
#include"macro/xforward.hpp"
#include"macro/xstruct.hpp"
#include"meta/has_constructor.hpp"
#pragma pop_macro("xuser")

namespace mixc::adapter_multi_push {
    // clang11 不支持从 fianl_t::item_t 获取参数
    template<class final_t, class item_t>
    xstruct(
        xtmpl(multi_push, final_t, item_t)
    )

        template<class first_t, class second_t, class ... args_t>
        #ifndef xfor_vscode_hint
        requires(
            inc::has_constructor<item_t, void(first_t &&)> and (
            inc::has_constructor<item_t, void(second_t &&)> and ... and inc::has_constructor<item_t, void(args_t &&)>)
        )
        #endif
        // 参数需要大于等于 2 个，这样才可以和子类的 push 区分开来
        void push(first_t && first, second_t && second, args_t && ... list){
            xthex.push(xforward(first));
            xthex.push(xforward(second));

            if constexpr (sizeof...(args_t) != 0){
                xthex.push(xforward(list)...);
            }
        }
    $
}

#endif

xexport(mixc::adapter_multi_push::multi_push)
